cmake_minimum_required(VERSION 3.10)
project(icr_poc)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

include_directories(include)

# find_package(zmq REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(ZMQ REQUIRED libzmq)
include_directories(${ZMQ_INCLUDE_DIRS})
# target_link_libraries(data_source ${ZMQ_LIBRARIES})

set(ICR_INCLUDE_DIR include)
set(SOURCE_DIR src)

set(MODULES
    data_source
    tsp
    data_center
    main_controller
)

foreach(MODULE ${MODULES})
    add_subdirectory(src/${MODULE})
endforeach()

add_executable(icr ${SOURCE_DIR}/main.cpp)
target_link_libraries(icr 
    ${MODULES}
)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)